package net.adetech.crj.service;

import net.adetech.crj.dao.AdviceMapper;
import net.adetech.crj.entity.Advice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service("advice.new")
public class NewAdviceService implements BaseService {
    @Autowired
    AdviceMapper adviceMapper;
    @Override
    public Map<String, Object> invoke(Map<String, Object> params) {
        Advice advice = (Advice)params.get("advice");
        this.adviceMapper.newAdvice(advice);
        return new HashMap<String, Object>();
    }
}
